#imp to oracle
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=datamart
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_TERM=xterm
export NLS_LANG=AMERICAN_AMERICA.UTF8
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib/:$LD_LIBRARY_PATH

#!/bin/bash
flag=`sqlplus -S /nolog <<EOF
set heading off feedback off pagesize 0 verify off echo off
conn username/pwd
select 1 from  dual;
exit;
EOF`


if [ $flag -gt 0 ]; then
coun=`sqlplus -S /nolog <<EOF
set heading off feedback off pagesize 0 verify off echo off
conn username/pwd
select 2 from dual;
exit;
EOF`
echo $coun